<template>
	<view class="gameinfo">
		<uni-section title="游戏配置" type="line" class="gameConfig">
			<uni-list>
				<uni-list-item title="游戏人数" :rightText="num +'人局'" />
				<uni-list-item title="游戏日期" :rightText="date" />
				<uni-collapse>
					<uni-collapse-item title="查看详细配置" :show-animation="true">
						<view class="content">
							<Configuration />
						</view>
					</uni-collapse-item>
				</uni-collapse>
				<uni-list-item title="游戏状态" :rightText="gameProcessStatus" />
				<uni-list-item v-show="currentStageShow" title="当前回合" :rightText="gameStageCodeTrans" />
			</uni-list>
		</uni-section>
	</view>
</template>

<script>
	import Configuration from '@/components/configuration.vue'
	import {
		mapState,
		mapGetters
	} from "@/store/helper/dm"
	import "@/common/utils/common.js"
	export default {
		components: {
			Configuration,
		},
		props: ['num', 'date'],
		computed: {
			currentStageShow() {
				return this.gameStatus === "init" ? false : true
			},
			...mapState([
				"user",
				"gameStatus"
			]),
			...mapGetters([
				"gameProcessStatus",
				"gameStageCodeTrans"
			])

		}
	}
</script>

<style lang="scss" scoped>
</style>
